package com.chuanyang.driverh.mainmy;

import android.os.Bundle;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.chuanyang.driverh.BaseApplication;
import com.chuanyang.driverh.R;
import com.chuanyang.driverh.base.BaseTitleActivity;
import com.chuanyang.driverh.responseresult.DriverInfoData;
import com.chuanyang.driverh.utils.ActivityUtil;


/**
 *
 */

public class PassidentifyActivity extends BaseTitleActivity {
    //“1”表示车辆认证中   "2"表示车队等待后台验证 "3"船队等待后台认证"
    private ImageView iv_icon;
    private TextView tv_content;
    private ImageView iv_icon1;
    private TextView tv_notice;
    private String index;
    private DriverInfoData driverinfo;

    @Override
    protected int getContentResId() {
        return R.layout.my_act_extrainfo;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        iv_icon1 = (ImageView) findViewById(R.id.iv_icon);
        tv_content = (TextView) findViewById(R.id.tv_passidentify_content);
        tv_notice = (TextView) findViewById(R.id.tv_passidentify_notice);
    }

    @Override
    protected void initData() {
        setBackImg();
        driverinfo = BaseApplication.getInstance().getDriverInfo();
        index = getIntent().getStringExtra("data");
        if (index.equals("2")) {
            tv_content.setText("车队正在创建中");
            tv_notice.setText("请耐心等待后台审批！");
            getTitleTextView().setText("创建车队");
            getRightTextView().setText("");
        } else if (index.equals("3")) {
            tv_content.setText("船队正在创建中");
            tv_notice.setText("请耐心等待后台审批！");
            getTitleTextView().setText("创建船队");
            getRightTextView().setText("");
        } else {
            getTitleTextView().setText("车/船认证");
            getRightTextView().setText("重新认证");
        }
    }

    @Override
    protected void initListener() {

    }
    @Override
    protected void baseGoEnsure() {
        if (TextUtils.isEmpty(mBaseEnsure.getText())) {
            return;
        }
        else if (driverinfo.getDriver().getDriverType() != null) {
            ActivityUtil.startActivity(activityContext,AccredCarOrShipTeamActivity.class);

         /*   if (driverinfo.getDriver().getDriverType() == 2) {
                ActivityUtil.startActivity(activityContext,CarIdentifyActivity.class);

            } else {
                ActivityUtil.startActivity(activityContext,ShipIdentifyActivity.class);

            }*/
        }
    }
}
